package version2024.easy;
import java.util.*;
/**
 * @author sunhl
 * @Description: HJ2 计算某字符出现次数
 * @Date: created in 2025/1/10 星期五 17:52
 * @Modified By:
 */
public class HJ2_CalculateNumberOccurrencesOfCertainCharacter {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        while (in.hasNext()) { // 注意 while 处理多个 case
            String str = in.nextLine().toLowerCase();
            String s = in.nextLine().toLowerCase();
            System.out.print(str.length() - str.replaceAll(s, "").length());
        }
    }
}
